<html>
<head>
    <title>test</title>
	<meta charset="utf-8">
	<!--
	<meta http-equiv="X-UA-Compatible" content="IE=edge">
	-->
	<!--<meta name="viewport" content="width=device-width, initial-scale=1.0">-->
	<!--
	<link rel="stylesheet" type="text/css" href="bootstrap.min.css" />
	<link rel="stylesheet" type="text/css" href="../css/index.css" />
	-->
	<script type="text/javascript" src="https://code.jquery.com/jquery-3.2.1.min.js"></script>
	<!--
	<script type="text/javascript" src="bootstrap.min.js"></script>
	<script type="text/javascript" src="index.js"></script>
	-->
	<script type="text/javascript">
    $(document).ready(function () {
		$.ajax({
			url:'userInfo/list.do',
			type:'GET',
			dataType:'json',
			success: function(data){
				console.log("返回成功数据: " + JSON.stringify(data));
				$.each(data, function (i, items) {  //遍历获取数据
					var $tr = $("<tr></tr>"); //表格的一行，在里面可以加各种属性;
					var $td = $("<td></td>"); //行中的元素
					$tr.append($td.clone().text(items.id)); //把数据填充到单元格中
					$tr.append($td.clone().text(items.name));
					$("#bindAddress").after($tr);//最后要把内容放入要绑定的地方
				});

			},
			error: function(XMLHttpRequest, ajaxOptions, thrownError){
				console.log("返回失败数据 statusText: " + XMLHttpRequest.statusText);
				console.log("返回失败数据 responseText: " + XMLHttpRequest.responseText);
				console.log("返回失败数据 status: " + XMLHttpRequest.status);
				console.log("返回失败数据 thrownError: " + thrownError);
			}
		});
    });
	</script>
	
 </head>
<body>	

<!--
  <div id="navigator">
	<p id="p1"> this is test2 </p>
  </div>
  <div id="header">
  </div>
  <div id="banner">
  </div>
  <div id="bodyer">
  </div>
  <div id="footer">
  </div>
-->
<table class="content-table">
    <tr id="bindAddress" class="first-child">
        <td class="first-child">时间</td>
        <td class="last-child">详情</td>
    </tr>
</table>



</body>
</html>
